package com.gopay.common.constants.solution;

import com.gopay.common.constants.bank.BisBankBusinessProd;

/**
 * @author yu_liu6@hnair.com
 * @date $date$
 */
public enum  CardTypeEnum {
    /**
     * ALL-系统存量数据，不区分借贷记
     */
    ALL("0", "", "全部"),
    DEBIT("1", BisBankBusinessProd._15.value, "借记卡"),
    CREDIT("2", BisBankBusinessProd._05.value, "贷记卡");

    public String innerCardType;
    public String cardTypeForNetsUnion;
    public String desc;
    CardTypeEnum(String innerCardType, String cardTypeForNetsUnion, String desc){
        this.innerCardType = innerCardType;
        this.cardTypeForNetsUnion = cardTypeForNetsUnion;
        this.desc = desc;
    }

    public String getInnerCardType() {
        return innerCardType;
    }

    public void setInnerCardType(String innerCardType) {
        this.innerCardType = innerCardType;
    }

    public String getCardTypeForNetsUnion() {
        return cardTypeForNetsUnion;
    }

    public void setCardTypeForNetsUnion(String cardTypeForNetsUnion) {
        this.cardTypeForNetsUnion = cardTypeForNetsUnion;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static String transCardTypeToNetsUnion(String innerCardType){
        for(CardTypeEnum cardTypeEnum : CardTypeEnum.values()){
            if(cardTypeEnum.getInnerCardType().equals(innerCardType)){
                return cardTypeEnum.getCardTypeForNetsUnion();
            }
        }
        return "";
    }
}
